IP forwarding also known as Internet routing is a process used to determine which path a packet or datagram can be sent. The process uses routing information to make decisions and is designed to send a packet over multiple networks.
Ideally, algorithms that are used for IP forwarding would take into account a packet/datagram's length, the type of service specified in the datagram's header, and the network load to determine the best path to send a packet to its intended destination. However, in general most routing software determines its route through a shortest path algorithm.[1]